﻿@using Abc.Core;
@using Abc.Core.Entities;
@using Abc.Application;
@model Abc.Application.HtAdminServices.HtFilesOut;


@{
    ViewData["Title"] = "文件";
}



<section class="panel panel-padding">
    <div class="layui-tab layui-tab-brief" lay-filter="TabBrief_Files">

        <form class="layui-form" action="" id="from_Files">
               <input type="hidden" asp-for="Id" />
          
               <table class="layui-table">
                <tbody>
<tr>
                        <td width="200px;">父ID</td>
                        <td>
                       
                            <input  asp-for="PID" lay-verify="PID" autocomplete="off" placeholder="请输入父ID" class="layui-input">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">文件类型</td>
                        <td>
                       
                            <input  asp-for="FileType" lay-verify="FileType" autocomplete="off" placeholder="请输入文件类型" class="layui-input">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">文件存储类型</td>
                        <td>
                       
                            <input  asp-for="FileStorageType" lay-verify="FileStorageType" autocomplete="off" placeholder="请输入文件存储类型" class="layui-input">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">名称</td>
                        <td>
                       
                            <input  asp-for="Name" lay-verify="Name" autocomplete="off" placeholder="请输入名称" class="layui-input">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">扩展名</td>
                        <td>
                       
                            <input  asp-for="Extension" lay-verify="Extension" autocomplete="off" placeholder="请输入扩展名" class="layui-input">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">大小</td>
                        <td>
                       
                            <input  asp-for="Size" lay-verify="Size" autocomplete="off" placeholder="请输入大小" class="layui-input">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">分类</td>
                        <td>
                       
                            <input  asp-for="Type" lay-verify="Type" autocomplete="off" placeholder="请输入分类" class="layui-input">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">存储到bucket的名称（文件唯一标识id）</td>
                        <td>
                       
                            <input  asp-for="FileObjectName" lay-verify="FileObjectName" autocomplete="off" placeholder="请输入存储到bucket的名称（文件唯一标识id）" class="layui-input">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">存储路径</td>
                        <td>
                       
                            <input  asp-for="FilePath" lay-verify="FilePath" autocomplete="off" placeholder="请输入存储路径" class="layui-input">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">是否开放文件
            开放的文件，任何人都可以访问读取</td>
                        <td>
                       
                            <input type="checkbox" asp-for="IsOpenFile" lay-skin="switch" title="开|关">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">层级</td>
                        <td>
                       
                            <input  asp-for="Level" lay-verify="Level" autocomplete="off" placeholder="请输入层级" class="layui-input">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">层级路径
            格式 a/b/c</td>
                        <td>
                       
                            <input  asp-for="LevelPath" lay-verify="LevelPath" autocomplete="off" placeholder="请输入层级路径
            格式 a/b/c" class="layui-input">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">来源数据ID</td>
                        <td>
                       
                            <input  asp-for="SourceDataId" lay-verify="SourceDataId" autocomplete="off" placeholder="请输入来源数据ID" class="layui-input">
                        </td>
                    </tr>
<tr>
                        <td width="200px;">来源数据类型</td>
                        <td>
                       
                            <input  asp-for="SourceDataType" lay-verify="SourceDataType" autocomplete="off" placeholder="请输入来源数据类型" class="layui-input">
                        </td>
                    </tr>
                    @*
                       <textarea placeholder="请输入内容" class="layui-textarea"></textarea>
                       <input type="radio" name="sex" value="男" title="男" checked="">
                       <input type="radio" name="sex" value="女" title="女">
                       <input type="radio" name="sex" value="禁" title="禁用" disabled="">
                    *@
                    <tr>
                        <td></td>
                        <td>
                            <div class="layui-btn submitbtn" lay-submit lay-filter="submit">立即提交</div>
                            <div class="layui-btn layui-btn-danger closewindow">关闭窗口</div>
                            <div class="layui-btn layui-btn-danger refreshwindow">重新加载</div>
                        </td>
                    </tr>

                </tbody>
            </table>



        </form>
    </div>
</section>


@section Scripts{
     <script>
         layui.define(['element',  'jquery', 'form'], function () {
             let  $ = layui.jquery;
             let  form = layui.form;
             let  element = layui.element;
             
             abc.infoInit();
             //提交
             form.on('submit(submit)', function (obj) {
                 //obj.field.IsEnable=$('#IsEnable').is(':checked');
                 //obj.field.Remark = Remark.getContent();
                 abc.post({ url: '@(Url.Action("Edit", new { area = "HtAdmin" }))', data: obj.field
                    //,submitbtn:'submitbtn' //提交的按钮
                    //,isAutoEnableBtn:false //不自动启用按钮
                    //,IsSuccessCloseWindow:false //不关闭
                 });
                
                 return false;
             });
            
             
         });
     </script>
}

